package com.atguigu.eduservice.feign;

import com.aiguigu.commonutils.R;
import com.atguigu.eduservice.feign.impl.VodFeignServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @title: VodFeignController
 * @Author danghailiang
 * @Date: 2022/9/30 22:33
 * @Version 1.0
 */
@Api(description = "远程调用vod模块")
@FeignClient(name = "service-vod", fallback = VodFeignServiceImpl.class)
@Component
public interface VodFeignService {

    /**
     * 根据id删除视屏
     * @param videoSourceId 视屏id
     * @return 返回结果集
     */
    @ApiOperation("视频删除")
    @DeleteMapping("/api/vod/delAlyVideoById/{videoSourceId}")
    public R delAlyVideoById(@PathVariable("videoSourceId") String  videoSourceId);

    /**
     * 根据ids删除多个视屏
     * @param ids ids集合  /api/vod/deleteBatch
     * @return
     */
    @ApiOperation("视频批量删除")
    @DeleteMapping("/api/vod/deleteBatch")
    public R deleteBatch(@RequestParam("ids") List<String> ids);
}
